import React from 'react';
import moment from 'moment';
import './NewsPreview.less';

const NewPreview = (props) => (
  <div className="news-preview-content">
    <div className="preview-modal-item mb22">
      <label className="item-name">Title:</label>
      <div className="item-content">{props.newsListDetails.title}</div>
    </div>
    <div className="preview-modal-item mb22">
      <div className="preview-modal-item">
        <label className="item-name">Press:</label>
        <div className="item-content">{props.newsListDetails.press}</div>
      </div>
      <div className="preview-modal-item ml40">
        <label className="item-name">Time:</label>
        <div className="item-content">{moment(props.newsListDetails.gmtCreate).format('YYYY-MM-DD mm:ss')}</div>
      </div>
    </div>
    <div className="preview-modal-item">
      <label className="item-name">Text:</label>
      <div dangerouslySetInnerHTML = {{ __html: props.newsListDetails.content }}></div>
    </div>
  </div>
)

export default NewPreview;
